﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using SNSpirit.Service.Certificate;

namespace SNSpirit.Service.Authentication
{
    public delegate void AuthenticateCallback(AuthResult result);

    public delegate void LogoutCallback(LogoutResult result);

    public interface IAuthenticationService
    {
        AuthResult Authenticate(ICertificate certificate);

        void AuthenticateAsync(ICertificate certificate, AuthenticateCallback callback);

        LogoutResult Logout();

        void LogoutAsync(LogoutCallback callback);

        bool IsAuthenticated { get; }

        AuthenticationToken Token { get; }

        event EventHandler<AuthenticateStateChangedEventArgs> StateChanged;
    }
}